-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate reference Path before running Generating reference source #5419
Conversation
@@ -30,6 +30,7 @@ | |||
</ItemGroup> | |||
|
|||
<Target Name="GenerateReferenceAssemblySource" | |||
DependsOnTargets="ResolveAssemblyReferences" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? I would expect people needs to do a vertical build before running this target. You need the source assembly in order to generate a ref assembly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we do need this, now I see that I was the one that suggested it 😄
cc: @ericstj ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can avoid this like dotnet/runtime@b18753a#diff-037531bd6f403e414dc011246d42d393R115
not sure if thats the correct way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking about something similar as we only need ReferencePath for projects that have a ReferenceFromRuntime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check that you don’t build ProjectReferences when calling this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... If you do, you can use CallTarget instead of DependsOnTargets and set the property which disables building the ProjectReference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was not able to use callTarget because of this issue dotnet/msbuild#1006
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other options. What’s the experience right now? If I call This target what does it do WRT building ProjectReferences? (EG: we can call MSBuild on current project, ResolveReferences target passing BuildProjectReferences=false as global property, and get it's ouput)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am able to avoid this by 09b6f82#diff-154f708acf3f9e20aa7bc29fe50f4ff1R32
What’s the experience right now? If I call This target what does it do WRT building ProjectReferences?
It builds all the project references.
cc @ViktorHofer |
Would be nice to add tests at some point(tm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving assuming you validated the experience in dotnet runtime
Yes |
Related to dotnet/runtime#34604